package org.jeecg.modules.article.mapper;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

/**
 * creat by wanghaizhu
 */
@Mapper
@Repository
public interface ClickLikeMapper {

   @Select(value = "select * from phil_like where phil_like.articleid= #{Articleid} and phil_like.userid= #{userId}")
   Boolean IsClickLike(@Param("Articleid") String Articleid,@Param("userId") String userId);

   @Insert(value = "insert into phil_like values (#{Articleid},#{userid})")
   int InsertClickLike(@Param("Articleid") String Article,@Param("userid") String userId);

   @Delete(value = "delete phil_like where  articleid=#{articleid} and userid=#{userid}")
   int DeleteClickLike(@Param("articleid") String articleid,@Param("userid") String userid);

}
